package com.example.mydemo.companyNature.controller;

import com.example.mydemo.companyNature.service.ICompanyNatureService;
import com.example.mydemo.companynature.entity.CompanyNature;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/company_nature")
public class CompanyNatureController {

    @Autowired
    private ICompanyNatureService companyNatureService;

    @GetMapping("/select")
    public List<CompanyNature> select() {
        return companyNatureService.select();
    }
    @GetMapping("/id_name")
    public Map<Integer, String> idName() {
        return companyNatureService.idName();
    }
}
